﻿namespace ERP_SaaS_WinForm.登录.Common
{
	public static class TokenDto
	{
		public static string JwtToken { get; set; } = string.Empty;
		public static string Name { get; set; } = string.Empty;
		public static string Password { get; set; } = string.Empty;

		/// <summary>
		/// 是否已登录（存在有效的JWT）
		/// </summary>
		public static bool IsLoggedIn => !string.IsNullOrWhiteSpace(JwtToken);

		/// <summary>
		/// 清空保存的登录信息
		/// </summary>
		public static void Clear()
		{
			JwtToken = string.Empty;
			Name = string.Empty;
			Password = string.Empty;
		}
	}
}

